home *** CD-ROM | disk | FTP | other *** search
/ InterCD 1999 September / september_1999.iso / Site Building / Web Companion / WackyBanner.aj_ / WackyBanner.aj
Encoding:
Text File  |  1999-06-28  |  846 b   |  52 lines

  1. <form name="wa">
  2. <input type="text" size="50" name="banner" value="">
  3. </form>
  4. <script language="Javascript">
  5. <!--
  6. // original content taken from Nic's JavaScript Page with permission
  7. // lack of these three lines will result in copyright infringment
  8. // made by: Nic's JavaScript Page - http://www.javascript-page.com
  9.  
  10. var message = "#MSG#"
  11. var speed = 200
  12.  
  13. var x = 0
  14.  
  15. function initArray(n) {
  16.   this.length = n;
  17.   for (var i =1; i <= n; i++) {
  18.     this[i] = ' '
  19.   }
  20. }
  21.  
  22. wky = new initArray(7)
  23. wky[0] = "!!!"
  24. wky[1] = "@@@"
  25. wky[2] = "###"
  26. wky[3] = "$$$"
  27. wky[4] = "%%%"
  28. wky[5] = "^^^"
  29. wky[6] = "&&&"
  30. wky[7] = "***"
  31.  
  32. function wacky() {
  33.  
  34. var y = wky[x]
  35. document.wa.banner.value = y + message + y
  36.  
  37. if (wky.length != x) {
  38. x++
  39. }
  40.  
  41. else {
  42. x = 0
  43. }
  44.  
  45. setTimeout("wacky()", speed);
  46. }
  47.  
  48. wacky();
  49. //-->
  50. </script>
  51.  
  52.